<?php
namespace app\admin\validate;

/**
 * 验证器
 */
use think\Validate;

class Platform extends Validate
{
    protected $rule = [
        'name'     => 'require|max:25|unique:platform',
        'num'      => 'require|number|unique:platform',
        'http'     => 'url',
        'email'    => 'email',
        'mobile'   => 'mobile',
        'gameport' => 'number',
        'userport' => 'number',
        'logport'  => 'number',
    ];

    protected $message = [
        'name.require' => '渠道必填',
        'name.max'     => '渠道最多不能超过25个字符',
        'name.unique'  => '渠道已经存在',

        'num.require'  => '渠道ID必填',
        'num.number'   => '渠道ID只能为数字',
        'num.unique'   => '渠道ID已经存在',

    ];
}
